package com.example.librarymanagement.dto.periodical;

import com.example.librarymanagement.entity.PeriodicalType;
import com.example.librarymanagement.util.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author zjia
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
public class PeriodicalUpdDto extends BaseDto<PeriodicalType> {

    @ApiModelProperty(value = "ID")
    @NotNull(message = "id不为空")
    private Integer id;

    @ApiModelProperty(value = "国际标准书号")
    @NotBlank(message = "issn码不能为空")
    private String issn;

    @ApiModelProperty(value = "统一刊号")
    @NotBlank(message = "统一刊号不能为空")
    private String unifyingCallNumber;

    @ApiModelProperty(value = "中文名")
    private String cName;

    @ApiModelProperty(value = "期刊名称")
    @NotBlank(message = "期刊名称不能为空")
    private String name;

    @ApiModelProperty(value = "编辑部")
    private String sponsors;

    @ApiModelProperty(value = "类型id")
    @NotNull(message = "类型值不能为空")
    private Integer typeId;

    @ApiModelProperty(value = "语种")
    @NotBlank(message = "期刊语种不能为空")
    private String languages;

    @ApiModelProperty(value = "出版单位")
    @NotBlank(message = "出版单位不能为空")
    private String publisher;

    @ApiModelProperty(value = "总期数")
    @NotBlank(message = "总期数不能为空")
    private String totalIssue;
}
